home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / h / highspeedpascalv2.0b.dms / highspeedpascalv2.0b.adf / Interface / Diskfont.pas < prev    next >
Pascal/Delphi Source File  |  1992-01-16  |  1KB  |  74 lines

  1. Unit Diskfont;
  2.  
  3. Interface
  4. Uses Graphics, AmigaDOS, Exec;
  5.  
  6. Type
  7.   tAvailFonts = Record
  8.           af_Type: Integer;
  9.           af_Attr: tTextAttr;
  10.         End;
  11.  
  12.   tFontContentsHeader = Record
  13.           fch_FileID: Integer;
  14.           fch_NumEntries: Integer;
  15.         End;
  16.  
  17.   tFontContents = Record
  18.           fc_FileName: Array [0..255] of ShortInt;
  19.           fc_YSize: Integer;
  20.           fc_Style: ShortInt;
  21.           fc_Flags: ShortInt;
  22.         End;
  23.  
  24.   tDiskFontHeader = Record
  25.           dfh_DF: tNode;
  26.           dfh_FileID: Integer;
  27.           dfh_Revision: Integer;
  28.           dfh_Segment: LongInt;
  29.           dfh_Name: Array [0..31] of ShortInt;
  30.           dfh_TF: tTextFont;
  31.         End;
  32.  
  33.   tAvailFontsHeader = Record
  34.           afh_NumEntries: Integer;
  35.         End;
  36.  
  37.   pLibrary = ^tLibrary;
  38.   pAvailFontsHeader = ^tAvailFontsHeader;
  39.   pFontContentsHeader = ^tFontContentsHeader;
  40.   pTextFont = ^tTextFont;
  41.   pDiskFontHeader = ^tDiskFontHeader;
  42.   pTextAttr = ^tTextAttr;
  43.  
  44.  
  45. Var
  46.   DiskfontBase: pLibrary;
  47.  
  48.  
  49. Const
  50.   MAXFONTNAME = $20;
  51.   MAXFONTPATH = $100;
  52.   FCH_ID = $F00;
  53.   DFH_ID = $F80;
  54.   AFB_MEMORY = $0;
  55.   AFF_MEMORY = $1;
  56.   AFB_DISK = $1;
  57.   AFF_DISK = $2;
  58.  
  59.  
  60. Function OpenDiskFont (textAttr: pTextAttr): pTextFont;
  61. Function AvailFonts
  62.          (buffer: pAvailFontsHeader;
  63.           bufBytes: LongInt;
  64.           flags: LongInt): LongInt;
  65.  
  66. Function NewFontContents
  67.          (fontsLock: LongInt;
  68.           fontName: String): pFontContentsHeader;
  69.  
  70. Procedure DisposeFontContents (fontContentsHeader: pFontContentsHeader);
  71.  
  72.  
  73. End.
  74.